package com.kefu.robot.service;

import com.kefu.sys.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kefu.common.service.AbstractKefuService;
import com.kefu.robot.mapper.RobotAidataInfoMapper;
import com.kefu.robot.model.RobotAidataInfo;

/**
 * @author xiaoyu
 * @date 2023/11/03
 */
@Service
public class RobotAidataInfoService extends AbstractKefuService<RobotAidataInfo> {
    @Autowired
    protected RobotAidataInfoMapper robotAidataInfoMapper;

    @Autowired
    protected RobotAidataDocService robotAidataDocService;

    @Autowired
    protected RobotAidataDocTypeService robotAidataDocTypeService;

    @Autowired
    protected SysUserMapper sysUserMapper;

    public RobotAidataInfo getAidataInfo(String id) {
        RobotAidataInfo info = getById(id);
        String createUserName = sysUserMapper.selectById(info.getCreateUser()).getUserName();
        String updateUserName = sysUserMapper.selectById(info.getUpdateUser()).getUserName();
        info.setCreateUserName(createUserName);
        info.setUpdateUserName(updateUserName);
        return info;
    }
}